import React from 'react'

class List extends React.Component{
    constructor(props){
        super(props);
        this.state={
            list:[{
                name:"jkj",
                sex:"male"
            },{
                name:"jkj",
                sex:"male"
            },{
                name:"jkj",
                sex:"female"
            }]
        }
    }

    render(){
        return (
            <>
                <ul>
                    {
                        this.state.list.map((item,index)=>{
                            return <li key={index}>  内容为 { item.name }  index: { index } </li>
                        })
                    }
                </ul>
            </>
        )
    }
}

export default  List
